Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add check updates command #577

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

alexng353
Copy link
Contributor

No description provided.

@brody192 brody192 changed the title feat: add check updates command feat: add check updates command [WIP] Dec 2, 2024
@alexng353 alexng353 changed the title feat: add check updates command [WIP] feat: add check updates command Dec 4, 2024
@coffee-cup coffee-cup added the release/minor Author minor release label Dec 9, 2024
Copy link
Contributor

@coffee-cup coffee-cup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good and just a few comments.

Can you also please add descriptions to any PRs so it makes it easier to review. This should include things like

  • Added commands (screenshots of the output is very useful)
  • Changes to behaviour.

src/commands/check_updates.rs Show resolved Hide resolved
src/commands/check_updates.rs Outdated Show resolved Hide resolved
@@ -42,3 +42,22 @@ macro_rules! interact_or {
}
};
}

#[macro_export]
macro_rules! check_update {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this have to be a macro instead of just a function? In general I'd prefer to avoid macros unless absolutely necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a macro because I can overload the call signature of it to default the second parameter to false, but I can make it into a function if you want.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a function is preferred here for simplicity. If you want to avoid having to provided false as the second parameter, we can have a check_update_command function that passed false

src/config.rs Outdated Show resolved Hide resolved
src/commands/check_updates.rs Show resolved Hide resolved
simplified check_updates command

fix: more user-friendly error message for check_updates on Config write
failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release/minor Author minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants